﻿''' <summary>
''' Provides access to a Windows MediaPlayer instance to play a single audio asset.
''' </summary>
''' <remarks></remarks>
Public Class AudioPlayer
    Inherits System.Windows.Media.MediaPlayer

    Public Property PlayerId As Guid

    Private _IsLoop As Boolean
    ''' <summary>
    ''' Determines if this audio file plays in a loop until stopped.
    ''' </summary>
    ''' <value></value>
    ''' <returns>True if the sound is being played in a loop, otherwise false.</returns>
    ''' <remarks></remarks>
    Public Property IsLoop() As Boolean
        Get
            Return _IsLoop
        End Get
        Set(ByVal value As Boolean)
            _IsLoop = value
        End Set
    End Property

    Public Sub New()
        PlayerId = Guid.NewGuid
    End Sub

    Public Sub New(id As Guid)
        PlayerId = id
    End Sub
End Class
